///#source 1 1 /DataModels/DataModelHelper.js (function ($, window, document, undefined) { function addBillingPhoneNumberValidation(input) { input = $(input); if (input.val() != undefined && input.val() != "") { if (input.val().indexOf("_") == -1) { return true; } else { return false; } } return true; } sComm.dataModels.addBillingPhoneNumberValidation = function (prop) { if (!prop.validation) prop.validation = {}; var validation = prop.validation; validation.isInvalidDate = { value: addBillingPhoneNumberValidation, message: "Phone number is incomplete" }; }; function addFutureDateValidation(input) { input = $(input); if (input.val() != undefined && input.val() != "") { if (((new Date(input.val()).getMonth() + 1) + "/" + new Date(input.val()).getDate() + "/" + new Date(input.val()).getFullYear()) == ((new Date().getMonth() + 1) + "/" + new Date().getDate() + "/" + new Date().getFullYear())) { return true; } if (new Date(input.val()) > new Date()) { return true; } else { return false; } } return true; } sComm.dataModels.CutOffDateValidation = function (prop) { if (!prop.validation) prop.validation = {}; var validation = prop.validation; validation.isInvalidDate = { value: addFutureDateValidation, message: "Please enter a date in the future" }; }; function addShippingAddressValidation(input) { input = $(input); if (input.val() != undefined && input.val() != "") { if (input.val().toLowerCase().replace(/ +/g, '').replace(/\./g,'').indexOf("pobox") == -1) { return true; } else { return false; } } return true; } sComm.dataModels.addShippingAddressValidation = function (prop) { if (!prop.validation) prop.validation = {}; var validation = prop.validation; validation.isInvalidDate = { value: addShippingAddressValidation, message: "Items can not be shipped to P.O. Boxes. Please enter a different address" }; }; })(jQuery, window, document); ///#source 1 1 /DataModels/FanwearWizardDataModel.js sComm.dataModels.BrandListDataModel = kendo.data.Model.define({ id: "BrandId", fields: { BrandName: { type: "string" }, SelectedImageUrl: { type: "string" }, ImageUrl: { type: "string" } }, defaultImage: function () { if (this.get("ImageUrl") == null) this.set("ImageUrl", "/Portals/_default/Skins/bsb/assets/images/no-image.jpg"); return ""; }, selectedImage: function () { if (this.get("SelectedImageUrl") == null) this.set("SelectedImageUrl", "/Portals/_default/Skins/bsb/assets/images/no-image.jpg"); return ""; } }); sComm.dataModels.ArticleListDataModel = kendo.data.Model.define({ id: "ProductTypeId", fields: { ProductTypeName: { type: "string" }, SelectedImageUrl: { type: "string" }, ImageUrl: { type: "string" } }, defaultImage: function () { if (this.get("ImageUrl") == null) this.set("ImageUrl", "/Portals/_default/Skins/bsb/assets/images/no-image.jpg"); return ""; }, selectedImage: function () { if (this.get("SelectedImageUrl") == null) this.set("SelectedImageUrl", "/Portals/_default/Skins/bsb/assets/images/no-image.jpg"); return ""; } }); sComm.dataModels.ArticleStyleListDataModel = kendo.data.Model.define({ id: "ProductId", fields: { ProductName: { type: "string" }, ArtworkXPoint: { type: "number" }, ArtworkYPoint: { type: "number" }, ImageHeight: { type: "number" }, ImageWidth: { type: "number" }, changeImage: { type: "string" }, SelectedColorIndex: { type: "number" }, IsAnyLowStock: { type: "boolean" }, lowStockTitle: { type: "string" } }, ArticleStyleImage: function () { var that = this; //var lowStockTitle = "The following items are low in stock:
"; //$.map(this.colors, function (colorVal, i) { // $.map(colorVal.sizes, function (val, index) { // if (val.Stock < 3) { // that.set("IsAnyLowStock", true); // lowStockTitle = lowStockTitle + that.ProductName + " [ Size: " + val.Text + " , Color:
]" + "
"; // } // }); //}); //that.set("lowStockTitle", lowStockTitle); if (!this.changeImage) { if (this.colors[0].ImageUrl != null) return this.colors[0].ImageUrl.replace("{size}", "160x160"); else return "/Portals/_default/Skins/bsb/assets/images/no-image.jpg"; } } }); sComm.dataModels.TemplateListDataModel = kendo.data.Model.define({ id: "ProductId", fields: { TemplateName: { type: "string" }, TemplateId: { type: "string" }, hasImageSet: { type: "boolean" } }, ImageUrl: function () { if (!this.get("hasImageSet")) { var defaultImage = "/Portals/_default/Skins/bsb/assets/images/no-image.jpg"; if (this.ImageUrl != null) { defaultImage = ImageUrl.replace("{size}", "160x160"); } return defaultImage; } } }); ///#source 1 1 /DataModels/StoreSettingsDataModel.js sComm.dataModels.DefaultTemplateListDataModel = kendo.data.Model.define({ id: "TemplateId", fields: { TemplateName: { type: "string" } } }); sComm.dataModels.GeneralSettingDataModel = kendo.data.Model.define({ id: "StoreSettingsId", fields: { ActivityTypes: { type: "array" }, InstanceKey: { type: "string" }, IsCustomArtwork: { type: "boolean" }, IsFanwareSetup: { type: "boolean" }, IsFundRaising: { type: "boolean" }, IsSetupCompleted: { type: "boolean" }, LeagueHeading: { type: "string", nullable: false, validation: { required: { maxlength: { value: "50" }, message: "Organization Name Required" } } }, LeagueSubHead: { type: "string" }, PortalId: { type: "number" }, PrimaryColorCssCode: { type: "string", nullable: false, validation: { required: { message: "Color 01 Selection is required" } } }, PrimaryColorName: { type: "string" }, SecondaryColorCssCode: { type: "string", nullable: false, validation: { required: { message: "Color 02 Selection is required" } } }, SecondaryColorName: { type: "string", }, StoreSettingsId: { type: "number" }, TertiaryColorCssCode: { type: "string" }, TertiaryColorName: { type: "string" }, UserId: { type: "number" } }, ColorSelected: function () { var primary = this.get("PrimaryColorCssCode"); return !(primary == "#000000"); } }); sComm.dataModels.FanwearTemplateVendorStyleListDataModel = kendo.data.Model.define({ id: "FanwearTemplateVendorStyleId", fields: { BrandName: { type: "string" }, ProductTypeName: { type: "string" }, TemplateId: { type: "string" }, TemplateName: { type: "string" }, ProductName: { type: "string" }, PrintLocationId: { type: "string" }, ImageHeight: { type: "string" }, ImageWidth: { type: "string" }, ArtworkXPoint: { type: "string" }, ArtworkYPoint: { type: "string" } } }); sComm.dataModels.FanwearTemplateVendorStyleDataModel = kendo.data.Model.define({ id: "id", fields: { BrandId: { type: "number", nullable: false, validation: { required: { message: "Brand is Required" } } }, StyleCode: { type: "string", nullable: false, validation: { required: { message: "StyleCode is Required" } } }, TemplateId: { type: "number", nullable: false, validation: { required: { message: "Template is Required" } } }, PrintLocationId: { type: "number", nullable: false, validation: { required: { message: "Print Location Id is Required" } } }, PrintLocation: { type: "string", nullable: false, validation: { required: { message: "Print Location is Required" } } }, ImageHeight: { type: "number", nullable: false, validation: { required: { message: "Image Height is Required" }, pattern: { value: '[1-9]([0-9])*', message: "Image Height must be greater than zero" } } }, ImageWidth: { type: "number", nullable: false, validation: { required: { message: "Image Width is Required" }, pattern: { value: '[1-9]([0-9])*', message: "Image Width must be greater than zero" } } }, ArtworkXPoint: { type: "number", nullable: false, validation: { required: { message: "Artwork X Point is Required" }, pattern: { value: '[1-9]([0-9])*', message: "Artwork X Point must be greater than zero" } } }, ArtworkYPoint: { type: "number", nullable: false, validation: { required: { message: "Artwork Y Point is Required" }, pattern: { value: '[1-9]([0-9])*', message: "Artwork Y Point must be greater than zero" } } }, CreateInInitialWizard: { type: "boolean", }, AnchorPoint: { type: "number", nullable: false, validation: { required: { message: "Anchor Point is Required" } } } } }); ///#source 1 1 /DataModels/ShoppingCartOrMerchandisedItemListDataModel.js sComm.dataModels.ShoppingCartOrMerchandisedItemListDataModel = function () { return kendo.data.Model.define({ id: "CartItemId", fields: { ProductId: { type: "number" }, ProductName: { type: "string" }, Price: { type: "number" }, DefaultImage: { type: "string" }, InStock: { type: "boolean" }, Quantity: { type: "number" }, OldQuantity: { type: "number" }, SizeId: { type: "number" }, OldSizeId: { type: "number" }, IsUpdateVisible: { type: "boolean" }, Quantities: { type: "array" }, ValidationMessage: { type: "string" }, TotalPrice: { type: "number" }, ProductInventoryId: { type: "number" }, OldProductInventoryId: { type: "number" }, HasPriceChanged: { type: "boolean" }, IsProductActive: { type: "boolean" }, OldPrice: { type: "number" } } }); } ///#source 1 1 /DataModels/MultipleProductEditDataModel.js sComm.dataModels.MultipleProductEditDataModel = kendo.data.Model.define({ id: "ProductId", fields: { ProductName: { type: "string" }, Price: { type: "number" }, ProductTypeId: { type: "number" }, IsFeatured: { type: "boolean" }, IsHidden: { type: "boolean" }, Gender: { type: "string" }, DefaultImage: { type: "string" } }, ItemDescription: function () { var defaultImage = "/Portals/_default/Skins/bsb/assets/images/no-image.jpg"; if (this.get("ImageUrl") != null && this.get("ImageUrl") != "") { this.set("DefaultImage", this.get("ImageUrl").replace("{size}", "160x160")); } if (!this.get("DefaultImage")) { this.set("DefaultImage", defaultImage); } var dataString = this.get("ProductName"); if (dataString.length > 125) { dataString = dataString.substring(0, 125) + '...'; } return dataString; } }); ///#source 1 1 /DataModels/CheckOutDataModel.js sComm.dataModels.ShippingOrPaymentInfoDataModel = kendo.data.Model.define({ fields: { CreditCardNumber: { type: "string", defaultValue: "", nullable: false, validation: { required: { maxlength: { value: "16" }, message: stt.CO1011 } } }, ExpiryMonth: { type: "string", defaultValue: "", nullable: false, validation: { required: { message: stt.CO1012 } } }, ExpiryYear: { type: "number", defaultValue: "", nullable: false, validation: { required: { message: stt.CO1013 } } }, SecurityCVVCode: { type: "string", defaultValue: "", nullable: false, validation: { required: { message: stt.CO1014, }, pattern: { value: '.{3,4}', message: "Please enter atleast 3 digit security code" } } }, IsAddressSame: { type: "boolean" }, ShipFirstName: { type: "string", defaultValue: "", nullable: false, validation: { required: { message: stt.CO1003 } } }, ShipLastName: { type: "string", defaultValue: "", nullable: false, validation: { required: { message: stt.CO1004 } } }, ShipAddress1: { type: "string", defaultValue: "", nullable: false, validation: { required: { message: stt.CO1005 } } }, ShipAddress2: { type: "string" }, ShipCity: { type: "string", defaultValue: "", nullable: false, validation: { required: { message: stt.CO1006 } } }, ShipCountry: { type: "string", defaultValue: "", nullable: false, validation: { required: { message: stt.CO1007 } } }, ShipStateCode: { type: "string", validation: { required: { maxlength: { value: "20" }, message: stt.CO1008 } } }, ShipState: { type: "string" }, ShipZip: { type: "string", defaultValue: "" }, ShipZip1: { type: "string", defaultValue: "", nullable: false, validation: { required: { message: stt.CO1009 }, pattern: { value: "[0-9][0-9][0-9][0-9][0-9]", message: stt.CO1010 } } }, ShipZip2: { type: "string", defaultValue: "", nullable: true, validation: { pattern: { value: "[0-9][0-9][0-9][0-9]", message: stt.CO1010 } } }, ShipEmail: { type: "string", nullable: false, validation: { required: { message: stt.CO1000 }, emailValidation: { message: stt.CO1002, value: function () { var input = this.element; if (!input) return true; var email = input.val(); var regexToValidateEmail = /^(((([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,})))|(^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$))/; if (regexToValidateEmail.test(email)) { return true; } else { return false; } } } } }, BillFirstName: { type: "string", defaultValue: "", nullable: false, validation: { required: { message: stt.CO1003 } } }, BillLastName: { type: "string", defaultValue: "", nullable: false, validation: { required: { message: stt.CO1004 } } }, BillAddress1: { type: "string", defaultValue: "", nullable: false, validation: { required: { message: stt.CO1005 } } }, BillAddress2: { type: "string" }, BillCity: { type: "string", defaultValue: "", nullable: false, validation: { required: { message: stt.CO1006 } } }, BillCountry: { type: "string", defaultValue: "", nullable: false, validation: { required: { message: stt.CO1007 } } }, BillState: { type: "string" }, BillStateCode: { type: "string", defaultValue: "", nullable: false, validation: { required: { message: stt.CO1008 } } }, BillZip: { type: "string", defaultValue: "" }, BillZip1: { type: "string", defaultValue: "", nullable: false, validation: { required: { message: stt.CO1009 }, pattern: { value: "[0-9][0-9][0-9][0-9][0-9]", message: stt.CO1010 } } }, BillZip2: { type: "string", defaultValue: "", nullable: true, validation: { pattern: { value: "[0-9][0-9][0-9][0-9]", message: stt.CO1010 } } }, BillEmail: { type: "string", nullable: false, validation: { required: { message: stt.CO1000 }, emailValidation: { message: stt.CO1002, value: function () { var input = this.element; if (!input) return true; var email = input.val(); var regexToValidateEmail = /^(((([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,})))|(^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$))/; if (regexToValidateEmail.test(email)) { return true; } else { return false; } } } } }, ShipPhone: { type: "string" }, BillPhone: { type: "string" }, CardType: { type: "string" }, GrandTotal: { type: "number" }, AuthCode: { type: "string" }, AvsCode: { type: "string" }, CartId: { type: "string" }, CCType: { type: "string" }, CurrentUserId: { type: "number" }, UserId: { type: "number" }, FamilyId: { type: "number" }, InstanceKey: { type: "string" }, OrderId: { type: "number" }, PaymentAmount: { type: "number" }, PaymentMessage: { type: "string" }, PaymentMethod: { type: "string" }, PortalId: { type: "number" }, PortalNameForDotnetCharge: { type: "string" }, TransactionId: { type: "string" }, ShippingCharges: { type: "string" }, AcceptJsDataDescriptor: { type: "string" }, AcceptJsDataValue: { type: "string" } } }); sComm.dataModels.addBillingPhoneNumberValidation(sComm.dataModels.ShippingOrPaymentInfoDataModel.prototype.fields.BillPhone); sComm.dataModels.addShippingAddressValidation(sComm.dataModels.ShippingOrPaymentInfoDataModel.prototype.fields.ShipAddress1); ///#source 1 1 /DataModels/OrderDataModel.js sComm.dataModels.OrderListDataModel = kendo.data.Model.define({ id: "OrderId", fields: { OrderId: { type: "number" }, OrderDateWithoutTime: { type: "date" }, UserId: { type: "number" }, OrderAmount: { type: "number" }, BaseAmount: { type: "number" }, TaxApplied: { type: "number" }, PaymentMethod: { type: "string" } } }); ///#source 1 1 /DataModels/StoreFrontDataModel.js sComm.dataModels.RetailStoreFrontListDataModel = kendo.data.Model.define({ id: "ProductId", fields: { ProductName: { type: "string" }, Price: { type: "string" }, Gender: { type: "string" }, ProductTypeId: { type: "number" }, IsFeatured: { type: "boolean" }, IsHidden: { type: "boolean" }, BrandId: { type: "number" }, AgeGroupId: { type: "number" }, DefaultImage: { type: "string" } }, ItemDescription: function () { var defaultImage = "/Portals/_default/Skins/bsb/assets/images/no-image.jpg"; if (this.get("ImageUrl") != null) { defaultImage = this.get("ImageUrl").replace("{size}", "160x160"); } if (!this.get("DefaultImage")) { this.set("DefaultImage", defaultImage); } var dataString = this.get("ProductName"); if (dataString.length > 125) { dataString = dataString.substring(0, 125) + '...'; } return dataString; } }); sComm.dataModels.SearchListDataModel = kendo.data.Model.define({ fields: { SearchItemName: { type: "string" } } }); sComm.dataModels.CatagoryListDataModel = kendo.data.Model.define({ fields: { Key: { type: "number" }, Value: { type: "string" }, IsCategory: { type: "boolean" }, isChecked: { type: "boolean" } } }); sComm.dataModels.FanwearStoreFrontListDataModel = kendo.data.Model.define({ id: "ProductId", fields: { ProductName: { type: "string" }, Price: { type: "string" }, Gender: { type: "string" }, ProductTypeId: { type: "number" }, IsFeatured: { type: "boolean" }, IsHidden: { type: "boolean" }, BrandId: { type: "number" }, AgeGroupId: { type: "number" }, DefaultImage: { type: "string" }, isFirst: { type: "boolean" } }, ItemDescription: function () { var defaultImage = "/Portals/_default/Skins/bsb/assets/images/no-image.jpg"; if (this.get("ImageUrl") != null) { defaultImage = this.get("ImageUrl").replace("{size}", "160x160"); } if (!this.get("DefaultImage")) { this.set("DefaultImage", defaultImage); } var dataString = this.get("ProductName"); if (dataString.length > 125) { dataString = dataString.substring(0, 125) + '...'; } this.set("isFirst", false); return dataString; } }); ///#source 1 1 /DataModels/ProductDetailDataModel.js sComm.dataModels.ProductDetailDataModel = kendo.data.Model.define({ id: "ProductId", fields: { Name: { type: "string" }, Gender: { type: "string" }, CategoryName: { type: "string" }, ProductName: { type: "string" }, FullDescription: { type: "string" }, TotalPrice: { type: "number" }, IsFeatured: { type: "boolean" } }, DefaultImages: function () { var defaultImage = "/Portals/_default/Skins/bsb/assets/images/no-image.jpg"; $.map(this.get("Colors"), function (val, i) { if (val.IsAvailable == true) { if (val.IsSelected == true) { defaultImage = val.ProductImage; } } }); return defaultImage; }, setClass: function (e) { $.map(this.get("Colors"), function (val, i) { if (val.IsAvailable == true) { if (val.IsSelected == true) return "setBorder"; else return "noBorder"; } else { return "crossMarkOnColor"; } }); } }); sComm.dataModels.ProductDetailSettingDataModel = kendo.data.Model.define({ id: "ProductId", fields: { IsFeatured: { type: "boolean" }, IsHidden: { type: "boolean" }, PortalProductId: { type: "number" }, CoachComments: { type: "string" }, CreatedBy: { type: "string" }, AdminUserName: { type: "string" }, CreatedOn: { type: "date" }, NumberOrdered: { type: "number" }, OtherStats: { type: "string" }, }, }); ///#source 1 1 /DataModels/CommonCadWorxDataModel.js sComm.dataModels.TemplateModel = kendo.data.Model.define({ id: "TemplateId", fields: { "TemplateName": { type: "string" }, "CadworxTemplateId": { type: "string" }, "TemplateType": { type: "string" } } }); sComm.dataModels.ClipArtModel = kendo.data.Model.define({ id: "clipArtId", fields: { "cadworxClipArtId": { type: "string" }, "imageUrl": { type: "string" }, "elementId": { type: "number" } } }); sComm.dataModels.ColorModel = kendo.data.Model.define({ id: "BaseColorId", fields: { "BaseColorName": { type: "string" }, "BaseColorCode": { type: "string" }, "R": { type: "string" }, "G": { type: "string" }, "B": { type: "string" } } }); ///#source 1 1 /DataModels/StoreWizardDataModel.js //var settingData; //var getMultiSelectActivityTemplate = false; //sComm.dataSources.loadStoreSettings(function (data) { // sComm.currentContext.setSettings(data); //}); //sComm.currentContext.getSettings(function (data) { // settingData = data; //}); //if (settingData.SelectedActivities.length > 1 || settingData.SelectedActivities[0].ActivityTypeId == 9) { // getMultiSelectActivityTemplate = true; //} sComm.dataModels.FanwearTemplateListDataModel = kendo.data.Model.define({ id: "TemplateId", fields: { SourceTemplateId: { type: "number" }, CadworxTemplateId: { type: "string" }, CadworxTemplateJson: { type: "string" }, ImageUrl: { type: "string" }, getImageUrl: { type: "string" }, TemplateModel: { type: "object" }, Name: { type: "string" }, IsChecked: { type: "boolean" }, IsBlank: { type: "boolean" }, IsToUpdateTemplate: { type: "boolean" }, showPopUp: { type: "boolean" }, IsMultiSelected: { type: "boolean" } }, getTemplateModel: function () { var templateJson = this.get("CadworxTemplateJson"); if (templateJson != null) { var model = JSON.parse(templateJson); this.set("TemplateModel", model); return model; } this.set("getImageUrl", 'url(\'' + this.get("ImageUrl") + '\')'); return null; } }); sComm.dataModels.ActivityListDataModel = kendo.data.Model.define({ id: "ActivityTypeId", fields: { IsSelected: { type: "boolean" } }, defaultImage: function () { if (this.get("ActivityIcon") == null) this.set("ActivityIcon", "/Portals/_default/Skins/bsb/assets/images/no-image.jpg"); return "" + this.get("ActivityName") + ""; }, selectedImage: function () { if (this.get("ActivityIcon") == null) this.set("SelectedActivityIcon", "/Portals/_default/Skins/bsb/assets/images/no-image.jpg"); return "" + this.get("ActivityName") + ""; } }); ///#source 1 1 /DataModels/UniformAdminPanelDataModel.js sComm.dataModels.UniformAdminDataModel = kendo.data.Model.define({ id: "UniformDetailId", fields: { DivisionId: { type: "number" }, ProgramId: { type: "number" }, ProductName: { type: "string", nullable: false, validation: { required: true } }, UniformModelType: { type: "string", nullable: false, validation: { required: true } }, ShippingModelType: { type: "string" }, UniformId: { type: "number" }, IsCollectNumber: { type: "boolean" }, IsNameField: { type: "boolean" }, IsTeamDependent: { type: "boolean" }, UniformModelId: { type: "number" }, ProductId: { type: "number" }, PortalId: { type: "number" }, InstanceKey: { type: "string" }, ShippingModelId: { type: "number" }, PreferredNameField: { type: "string" }, LeagueSpecificHelpText: { type: "string" } } }); sComm.dataModels.SizePriceDataModel = kendo.data.Model.define({ id: "ProductInventoryId", fields: { SizeCode: { type: "string" }, RetailPrice: { type: "number" } } }); sComm.dataModels.SalesRepresentatorDataModel = kendo.data.Model.define({ fields: { salesRepresentatorName: { type: "string", defaultValue: "", nullable: false, validation: { required: { message: stt.CO1022 } } }, salesRepresentatorEmail: { type: "string", nullable: false, validation: { required: { message: stt.CO1000 }, emailValidation: { message: stt.CO1002, value: function () { var input = this.element; if (!input) return true; var email = input.val(); var regexToValidateEmail = /^(((([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,})))|(^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$))/; if (regexToValidateEmail.test(email)) { return true; } else { return false; } } } } } } }); sComm.dataModels.CutOffDateToAllDivisionsDataModel = kendo.data.Model.define({ fields: { CutOffDateToAllDivisions: { type: "date", defaultValue: "", nullable: false, validation: { required: { message: "Please enter a date in the future" }, pattern: { value: '[0-9][0-9]/[0-9][0-9]/[0-9][0-9][0-9][0-9]', message: "Date must be in MM/DD/YYYY format" } } } } }); sComm.dataModels.CutOffDateValidation(sComm.dataModels.CutOffDateToAllDivisionsDataModel.prototype.fields.CutOffDateToAllDivisions); sComm.dataModels.CreateUniformItemsDataModel = kendo.data.Model.define({ fields: { Description: { type: "string", defaultValue: null, nullable: false, validation: { required: { message: "Please enter a description" } } }, SelectedBrand: { type: "string", defaultValue: null, nullable: false, validation: { required: { message: "Please make a selection" } } }, SelectedUniformModel: { type: "string", defaultValue: null, nullable: false, validation: { required: { message: "Please make a selection" } } }, SelectedShippingModel: { type: "string", defaultValue: null, nullable: false, validation: { required: { message: "Please make a selection" } } }, RetailPrice: { type: "float", defaultValue: null, nullable: false, validation: { required: { message: "Price is Required" } } }, ColorSelectionMessage: { type: "string" } } });